<template>
	<el-table :data="tableData" style="width: 100%" :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }" max-height="400">
		<el-table-column label="列表图" width="100">
			<template slot-scope="scope">
				<img :src="scope.row.avatar" alt="" />
			</template>
		</el-table-column>
		<el-table-column prop="title" label="标题" width="180"> </el-table-column>
		<el-table-column prop="des" label="描述"> </el-table-column>
	</el-table>
</template>

<script>
import request from "../../../api/home";
export default {
	data() {
		return {
			tableData: [],
		};
	},
	mounted() {
		request.getNews().then((res) => {
			if (res.code == 200 && res.success == 0) {
				this.tableData = res.data;
			}
		});
	},
};
</script>

<style></style>
